import React from 'react'

import {createAppContainer} from 'react-navigation'

import {createDrawerNavigator} from 'react-navigation-drawer'

import FontAwesome from 'react-native-vector-icons/FontAwesome'

import HomePage from '../Pages/HomePage'
import DetailPage from '../Pages/DetailPage'
import MyPage from '../Pages/MyPage'

const AppDrawerNavigator = createDrawerNavigator({
    HomePage: {
        screen: HomePage,
        navigationOptions: {
            drawerLabel: '首页',
            drawerIcon: ({tintColor, focused}) => {
                return <FontAwesome name="home" size={22} color={tintColor}></FontAwesome>
            }
        }
    },
    DetailPage: {
        screen: DetailPage
    },
    MyPage: {
        screen: MyPage
    },
})

export default createAppContainer(AppDrawerNavigator)